package com.zatech.cgnci.project.base.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * 业务场景类型枚举
 */
@Getter
@AllArgsConstructor
public enum BusinessScenariosTypeEnum {
    CLAIM_CASE("claim_case","理赔-立案"),
    CLAIM_RESERVE("claim_reserve","理赔-准备金"),
    CLAIM_PREPAYMENT("claim_prepayment","理赔-申请预付"),
    CLAIM_FINAL("claim_final","理赔-申请结案"),
    CLAIM_REOPEN("claim_reopen","理赔-重开"),
    POLICY_INSURANCE("policy_insurance","承保-保单"),
    POLICY_OBJECT("policy_object","承保-项目"),
    POLICY_DIVIDEIN("policy_dividein","承保-分入"),
    POLICY_DIVIDEOUT("policy_divideout","承保-分出"),
    ;
    public static BusinessScenariosTypeEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }
    private String code;
    private String descr;
    
    
    
    
    
}
